<{include file="common/header.tpl"}>
<link rel="stylesheet" href="<{$smarty.const._CDN_}>/resource/wei/css/style.css?<{$versionCode}>">
<style>
.btns { margin: 2em 1em; }
.btns a { padding: 6px 20px; background-color: #01d093; border: 1px solid green; color: #eee; }
.orderBox { padding: 1em; }
.orderRefund { display: none; background-color: #eee; color: #444; font-size: 14px; 
    padding: 1em; border: 1px dotted green;  
    margin: 5px 1em;
    }
</style>

<div class="btns"><a href="javascript:history.go(-1)">返回上一页</a></div>

<div class="orderBox">
	<div class="order-detail-header">
	    <{foreach from=$order.arrGoodsInfo item="goods"}>
	    <div class="left"><img class="img" src="<{$goods.goods.thumbsrc}>"></div>
	    <div class="right">
	                <p class="line"><{$goods.goods.name}></p>
	                <p class="line"><{$goods.goods.attr.desc}></p>
	                <p class="line">￥<{$goods.price/100|number_format:2}> x <{$goods.quantity}>件</p></div>
	    <{/foreach}>
	</div>

	<div class="order-detail-status">
	    <h3 class="title">订单状态: <{$order.statusName}> 
            <{if $order.status > 0 && $order.status < 6}>
            (<span class="refundIcon" onclick="$('.orderRefund').show()">订单退款</span>)
            <{/if}>
        </h3>
	</div>

	<div class="order-detail-status orderRefund">
        <form action="/admin/order/setStatus/<{$order.orderNo}>" method="POST">
            退款金额: <input type="text" name="moneyRefund" value="<{$moneyRefund/100|number_format:2}>">
            <input type="submit" name="submit_op" value="退款">
        </form>
	</div>
	
	
	<div class="order-detail-xijie">
	
	   <p class="line">下单时间: <{"Y-m-d H:i:s"|@date:$order.created}></p>
	   <p class="line">订单编号: <{$order.orderNo}></p>
	   <p class="line">订单金额: <span class="red">￥<{$order.moneyTotal/100|number_format:2}></span><span class="gray"> &nbsp; &nbsp;(含运费: ￥<{$order.moneyDeliver/100|number_format:2}>)</span></p>
	</div>
	
	

    <{foreach from=$gift.users item="user"}>
	<div class="order-detail-xinxi">
	
	    <p class="line">收货人: <{$user.addrUserName}> <{$user.addrTelNumber}></p>
	    <p class="line">收货地址: <{$user.addrDetailInfo}></p>
	    <p class="line">运送方式: <{$order.deliverName}></p>
	    <p class="line">快递单号: 
            <{$user.deliverNo}>

            &nbsp;
            <a style="color: red;" href="/admin/order/print/<{$order.orderNo}>/<{$user.uid}>" target="_blank">打印</a>
            <{if ! $user.deliverNo}>
            <form action="/admin/order/setGiftDeliverNo" method="POST">
                <input type="text" name="deliverNo" style="border: 1px solid #ccc; font-size: 14px;">
                <input type="hidden" name="orderNo" value="<{$order.orderNo}>">
                <input type="hidden" name="uid" value="<{$user.uid}>">
                <input type="submit" name="submit_op" value="设置快递单号">
            </form>
            <{/if}>
        </p>
	</div>
    <{/foreach}>
	
	
</div>

<div class="btns"><a href="javascript:history.go(-1)">返回上一页</a></div>


<{include file="common/footer.tpl"}>
